#include  <stdio.h>
int  Search(int a[], int n, int x);
main()
{ 	
	int    a[10];
	int    n=10, i, pos, x;          
	printf("Input 10 numbers:\n");
	for (i=0; i<n; i++)//1
	{ 	
		scanf("%d", &a[i]);           //1
	}
	printf("Input x:\n");
	scanf("%d",&x);                      //1
	pos = Search(a, n, x);                //2
	if (pos != -1)     //1          	
          { 	
		printf("Subscript of x is %d\n", pos);//1
	}
	else
	{ 	
		   printf("Not found!\n");//1
	}
} 	

int  Search(int a[], int n, int x)
{ 	
	int  i;

	for (i=0; i<n; i++)     //1          
	{ 	
		if (a[i] == x)             //2
  			    return i;       //1
	}
	return -1;                 //1
}